/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import eos.moe.dragoncore.data.SignData;
/*     */ import eos.moe.dragoncore.renderer.SignRenderer;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.tileentity.TileEntity;
/*     */ import net.minecraft.tileentity.TileEntitySign;
/*     */ import net.minecraft.tileentity.TileEntitySkull;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import net.minecraft.util.math.BlockPos;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class gp
/*     */ {
/*  28 */   public static final Map<String, zz> q = new HashMap<>();
/*  29 */   public static final Map<String, ld> g = new HashMap<>();
/*     */   
/*     */   public static ld v(String a) {
/*  32 */     if (!g.containsKey(a)) {
/*  33 */       ld ld = th.v(new ResourceLocation("dragoncore", "models/blocks/" + a + "/model.json"));
/*     */ 
/*     */       
/*  36 */       g.put(a, ld);
/*     */     } 
/*  38 */     return g.get(a);
/*     */   }
/*     */   
/*     */   public static void v(String a) {
/*  42 */     hw.v("models/blocks/" + a + "/texture.png");
/*     */   }
/*     */   
/*     */   public static void v(int a, int i, int j, String str) {
/*  46 */     TileEntity tileEntity = (Minecraft.func_71410_x()).field_71441_e.func_175625_s(new BlockPos(a, i, j));
/*  47 */     if (tileEntity instanceof TileEntitySkull) {
/*  48 */       TileEntitySkull tileEntitySkull = (TileEntitySkull)tileEntity;
/*     */       
/*  50 */       String str1 = cx.v((TileEntity)tileEntitySkull);
/*     */       
/*  52 */       if (str1 != null && str1.startsWith("none")) {
/*     */         return;
/*     */       }
/*  55 */       ex ex = ex.v(str1);
/*     */ 
/*     */       
/*  58 */       if (ex != null) {
/*  59 */         String str2 = ex.i;
/*     */         
/*  61 */         ld ld = v(str2);
/*     */         
/*  63 */         v(a, i, j, str2, ld, str);
/*     */       } 
/*  65 */     } else if (tileEntity instanceof TileEntitySign) {
/*  66 */       TileEntitySign tileEntitySign = (TileEntitySign)tileEntity;
/*     */       
/*  68 */       if (tileEntitySign.field_145915_a.length <= 1)
/*     */         return; 
/*  70 */       if (tileEntitySign.field_145915_a[1] == null) {
/*     */         return;
/*     */       }
/*  73 */       String str1 = tileEntitySign.field_145915_a[1].func_150254_d();
/*  74 */       SignData signData = SignRenderer.getSignData(str1);
/*  75 */       if (signData == null) {
/*     */         return;
/*     */       }
/*  78 */       if (signData.getModel() == null || signData.getCheck() == null) {
/*     */         return;
/*     */       }
/*  81 */       if (!signData.getCheck().contains("§")) {
/*     */         return;
/*     */       }
/*     */       
/*  85 */       String str2 = signData.getModel();
/*  86 */       ld ld = v(str2);
/*  87 */       v(a, i, j, str2, ld, str);
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   public static void v(int a, int i, int j, String str1, ld ld1, String str2) {
/*  93 */     String str = a + "," + i + "," + j + "," + str1;
/*     */     
/*  95 */     if (!q.containsKey(str)) {
/*  96 */       pm pm = pm.z();
/*  97 */       pm.v();
/*     */       try {
/*  99 */         Map<String, bo> map = mm.v(new ResourceLocation("dragoncore", "models/blocks/" + str1 + "/animation.json"));
/*     */ 
/*     */         
/* 102 */         pm.v(map);
/* 103 */         map.forEach((str, bo1) -> {
/*     */               if (str.contains("idle")) {
/*     */                 a.v((new gk(bo1)).v(1.0F), "base");
/*     */               }
/*     */             });
/* 108 */       } catch (Exception exception) {
/* 109 */         if (!(exception instanceof java.io.FileNotFoundException))
/*     */         {
/*     */           
/* 112 */           exception.printStackTrace();
/*     */         }
/*     */       } 
/*     */       
/* 116 */       zz zz1 = pm.v();
/*     */       
/* 118 */       q.put(str, zz1);
/*     */     } 
/* 120 */     zz zz = q.get(str);
/*     */     
/* 122 */     if ("idle".equals(str2)) {
/* 123 */       if (zz.v() != null && 
/* 124 */         !zz.isOnPlayAnimation()) {
/* 125 */         gk gk = zz.v().v();
/* 126 */         zz.v(gk, "base");
/*     */       }
/*     */     
/* 129 */     } else if (zz.h().containsKey(str2)) {
/* 130 */       bo bo = zz.h().get(str2);
/* 131 */       gk gk = new gk(bo);
/* 132 */       gk.v().v(0);
/* 133 */       zz.v(gk, "base");
/*     */     } 
/*     */     
/* 136 */     zz.v(ld1);
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\gp.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */